use std::ops::Index;

struct Solution {}

fn main() {}

impl Solution {
    pub fn find_relative_ranks(score: Vec<i32>) -> Vec<String> {
        let mut sorted_score = score.clone();
        sorted_score.sort();
        sorted_score.reverse();
        let mut ret_vec: Vec<String> = Vec::new();
        for sc in score {
            let index = sorted_score.iter().position(|&ele| ele == sc ).unwrap() as i32 + 1;
            match index {
                1 => { ret_vec.push(String::from("Gold Medal"))} ,
                2 => { ret_vec.push(String::from("Silver Medal"))} ,
                3 => { ret_vec.push(String::from("Bronze Medal"))} ,
                _ => {ret_vec.push(index.to_string())}
            }
        }
        ret_vec
    }
}